from celery import shared_task

import time
# 记录日志：
import logging

from utils.send import send_message

logger = logging.getLogger("django")


# 异步任务
@shared_task(name="sendmessage")
def sendmessage(to,content):
    print("向"+to+"发送信息"+content)
    time.sleep(5)
    print("发送完成")


@shared_task(name="send")
def sendmsg(phone,code):
    return send_message(phone,code)
